package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.R;
import com.ruoyi.common.core.domain.model.Broker;
import com.ruoyi.common.core.domain.model.Store;
import com.ruoyi.mapper.StoreMapper;
import com.ruoyi.service.IStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 门店Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-13
 */
@Service
public class StoreServiceImpl extends ServiceImpl<StoreMapper,Store> implements IStoreService
{
    @Autowired
    private StoreMapper storeMapper;

    /**
     * 查询门店
     * 
     * @param id 门店主键
     * @return 门店
     */
    @Override
    public Store selectStoreById(Long id)
    {
        return storeMapper.selectStoreById(id);
    }

    /**
     * 查询门店列表
     * 
     * @param store 门店
     * @return 门店
     */
    @Override
    public List<Store> selectStoreList(Store store)
    {
        return storeMapper.selectStoreList(store);
    }

    /**
     * 新增门店
     * 
     * @param store 门店
     * @return 结果
     */
    @Override
    public int insertStore(Store store)
    {
        return storeMapper.insertStore(store);
    }

    /**
     * 修改门店
     * 
     * @param store 门店
     * @return 结果
     */
    @Override
    public int updateStore(Store store)
    {
        return storeMapper.updateStore(store);
    }

    /**
     * 批量删除门店
     * 
     * @param ids 需要删除的门店主键
     * @return 结果
     */
    @Override
    public int deleteStoreByIds(Long[] ids)
    {
        return storeMapper.deleteStoreByIds(ids);
    }

    /**
     * 删除门店信息
     * 
     * @param id 门店主键
     * @return 结果
     */
    @Override
    public int deleteStoreById(Long id)
    {
        return storeMapper.deleteStoreById(id);
    }

}
